package com.vote.entity;

import com.baomidou.mybatisplus.enums.IdType;
import com.baomidou.mybatisplus.annotations.TableId;
import com.baomidou.mybatisplus.activerecord.Model;

import java.io.Serializable;


import com.baomidou.mybatisplus.annotations.Version;

import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * <p>
 *
 * </p>
 *
 * @author vote group
 * @since 2020-04-08
 */
@Data
@Accessors(chain = true)
public class Vote extends Model<Vote> {

    private static final long serialVersionUID = 1L;

    /**
     * 投票详情表id
     */
    @TableId(value = "vid", type = IdType.AUTO)
    private Integer vid;

    /**
     * 主题id(主题表外键)
     */
    private Integer tid;

    /**
     * 选项
     */
    private String opt;

    /**
     * 投票数量
     */
    private Integer num;


    @Override
    protected Serializable pkVal() {
        return this.vid;
    }

}
